package hlhj.fhp.checkpoint.utils

import android.annotation.SuppressLint
import android.content.Context
import com.example.mymvp.log
import hlhj.fhp.checkpoint.customView.LoadingDialog

/**
 * Created by Never Fear   on 2018\11\14 0014.
Never More....
 */
object LoadingUtls {
    @SuppressLint("StaticFieldLeak")
    var a=1;
    private var loadingDialog:LoadingDialog?=null
    fun show(c:Context){
        log("","出现的时候a=${a}")
        a++
        if (loadingDialog==null){
            loadingDialog=LoadingDialog(c)
            loadingDialog?.show()
        }
    }
    fun diss(){
        log("","消失的时候a=${a}")
        loadingDialog?.dismiss()
        loadingDialog=null
    }
}